package com.ma.workorder;

import android.os.Bundle;

import com.ma.BR;
import com.ma.R;

import java.util.ArrayList;
import java.util.List;

import base.BaseListActivity;
import entity.Order;

public class InProcessActivity extends BaseListActivity<Order> {

    @Override
    protected int getLayoutId() {
        return R.layout.pending_item;
    }

    @Override
    protected int getViewModelId() {
        return BR.pendingBean;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        adapter.setOnItemClickListener((view, position) -> {
            startActivity(InprocessOrderInfoActivity.class);

        });

    }

    @Override
    protected void onResume() {
        super.onResume();
        initData();
    }

    void  initData(){

          List<Order> orders= new ArrayList<>();
          orders.add(new Order("空调短路",true,true,true,"因此，另一个工作单元可能会对正在处理中的数据进行操作。",true,true,3,"2017-07-08 10:10","重庆市南岸区海棠溪街道学府大道81号（七公里加油站对面）"));
          orders.add(new Order("空调短路",true,true,true,"应用程序的主要业务逻辑驻留在操作处理中。",true,true,3,"2017-07-08 10:10","重庆市南岸区海棠溪街道学府大道81号（七公里加油站对面）"));
          orders.add(new Order("空调短路",true,true,true,"在正常处理中，有害消息极为稀有",true,true,3,"2017-07-08 10:10","重庆市南岸区海棠溪街道学府大道81号（七公里加油站对面）"));

          setData(orders);

    }


}
